package cn.com.gof.structure.proxy.dynamicProxy;

import java.lang.reflect.Proxy;

/**
 * <p>
 * Title: Client
 * </p>
 * <p>
 * Description:
 * </p>
 * 
 * @author WangJun
 * @date 2018年9月6日 下午4:36:24
 */
public class Client {
	public static void main(String[] args) {
		RealStar realStar = new RealStar();
		StarHandler starHandler = new StarHandler(realStar);

		Star newProxyInstance = (Star) Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(),
				new Class[] { Star.class }, starHandler);
		newProxyInstance.sing();
	}
}
